package umich.max.geolocation.featextract.tf;

import java.util.List;

public class TF {

	public static double computeTF(List<String> totalterms, String termToCheck) {
		double count = 0; // to count the overall occurrence of the term
							// termToCheck
		for (String s : totalterms) {
			if (s.equalsIgnoreCase(termToCheck)) {
				count++;
			}
		}
		return count / totalterms.size();
	}
}
